import React, { Component } from 'react'
import { withRouter, NavLink } from 'react-router-dom';
//withRouter非直系页面的时候
import { observer, inject } from 'mobx-react';
@withRouter
//自动更新
@inject('first','two')
//接受使用(设置地址)
@observer
//变成响应式的
class View extends Component {
    getStort() {
        console.log(this.props.first)
        console.log(this.props.two)
    }
    componentDidMount() {
        this.getStort()
    }
    render() {
        const { token } = this.props.first
        return (
            <React.Fragment>
                <div>
                    111456
                    <p>
                        {
                            token[1].name
                        }
                    </p>
                    <p>
                        {
                            token[1].id
                        }
                    </p>
                </div>
            </React.Fragment>
        )
    }
}
export default View



